<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>捐赠</title>
    <!-- Chosen CSS -->
    <link href="/${res}/css/chosen.min.css" rel="stylesheet">
    <!-- Chosen CSS -->
    <link href="/${res}/css/dashboard.css" rel="stylesheet">
    <!-- Custom Main StyleSheet CSS -->
    <link href="/${res}/style.css" rel="stylesheet">
    <!-- Color CSS -->
    <link href="/${res}/css/color.css" rel="stylesheet">
    <!-- Responsive CSS -->
    <link href="/${res}/css/responsive.css" rel="stylesheet">
    <style type="text/css">
        .gt_privacy_field>input[type="text"], .gt_privacy_field textarea{
            border-radius:0;
            min-height: 0;
        }
        .gt_d_upload_area{
            padding-top: 10%;
        }
        .c_ph{
            border: 1px solid #337ab7 !important;
        }
        .error-message{
            color: red;
        }
    </style>
    <!--Jquery Library-->
    <script src="${resSys}/jquery.js" type="text/javascript"></script>
    <script src="${resSys}/front.js" type="text/javascript"></script>
    <script type="text/javascript">
        $().ready(function () {
            $("#payMethod1").hide();
            $("#errorMsg_").hide();
             $("#rewardAmount").change(function () {
                 $("#errorMsg_").hide();
                 $("#payMethod1").hide();
             });
        });

        function rewardPay() {
            if($("#rewardAmount").val() == '' || $("#rewardAmount").val() == null){
                $("#errorMsg_").show();
                return false;
            }
            $("#errorMsg_").hide();
            $("#wcode").load("${base}/content/selectPay.jspx?contentId=${contentId!}&payMethod=1&chargeReward=${type!}&rewardAmount=" + $("#rewardAmount").val());
            $("#acode").load("${base}/content/selectPay.jspx?contentId=${contentId!}&payMethod=4&chargeReward=${type!}&rewardAmount=" + $("#rewardAmount").val());
            $("#payMethod1").show();
        }
        function changeAmountSubmit(obj){
            $("#rewardAmount").val($(obj).val());
            $("#payMethod1").hide();
        }
    </script>
</head>

<body>
<!--gt Wrapper Start-->
<div class="gt_wrapper">
    <!--Header Wrap Start-->
    [#include "../include/nav.html"/]
    <!--Header Wrap End-->

    <!--Sub Banner Wrap Start -->
    <div class="gt_sub_banner_bg default_width">
        <div class="container">
            <div class="gt_sub_banner_hdg  default_width">
                <h2>感谢您的捐赠</h2>
                <h6>您的捐赠会以公益基金的方式。。。</h6>
            </div>
        </div>
    </div>
    <!--Sub Banner Wrap End -->
    <!--Breadcrumb Wrap End -->
    <div class="gt_breadcrumb_bg default_width">
        <div class="container">
            <div class="gt_breadcrumb_wrap default_width">
                <ul>
                    <li><a href="${base}">首页</a></li>
                    <li><a href="javascript:void(0)">公益捐赠</a></li>
                </ul>
            </div>
        </div>
    </div>
    <!--Breadcrumb Wrap End -->

    <!--Main Content Wrap Start-->
    <div class="gt_content_wrap">
        <!--Classes Wrap Start-->
        <section class="gt_courses_bg">
            <div class="container">
                <!-- Dashboard Side Bar Wrap Start -->
                <div class="col-md-4">
                    <div class="gt-user-sidebar">
                        <div class="gt_d_author_wrap">
                            <div class="gt_d_author_pic_des">
                                <h5>捐赠项目</h5>
                                <span class="gt_hdg_span"></span>
                                <p>xxx公益基金</p>
                                <label>12345</label>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- Dashboard Side Bar Wrap End -->
                <!--Classes List Wrap Start-->
                <div class="col-md-8">
                    <div class="gt_d_classes_wrap default_width mb20">
                        <h4 class="gt_d_title">捐赠金额选项：（元）</h4>
                        <h7 class="gt_d_title">请<b>点击选择</b>您要捐献的金额！</h7>
                        <div class="gt_d_scl_setting default_width">
                            <div class="row">
                                <form class="gt_contact_form" id="form1" action="${base}/content/fixSelect.jspx" method="post">
                                    <input name="contentId" value="${contentId!}" type="hidden" />
                                    <input name="orderNumber" value="${orderNumber!}" type="hidden" />
                                    <input name="chargeReward" value="${type!}" type="hidden" />
                                    [#if rewardPattern??]
                                        [#if content.rewardPattern]
                                            [#list content.rewardFixValues as r]
                                            <div class="col-md-3">
                                                <div class="gt_privacy_field default_width mb20">
                                                    <input class="c_ph" type="text" value="${r!}" onclick="changeAmountSubmit(this)" readonly>
                                                </div>
                                            </div>
                                            [/#list]
                                        [#else]
                                            [#list fixs as fix]
                                            <div class="col-md-3">
                                                <div class="gt_privacy_field default_width mb20">
                                                    <input class="c_ph" type="text" value="${fix!}" onclick="changeAmountSubmit(this)" readonly>
                                                </div>
                                            </div>
                                            [/#list]
                                        [/#if]
                                    [#else]
                                        [#if randomList??]
                                        <!-- 随机值 -->
                                        [#list randomList as r]
                                        <div class="col-md-3">
                                            <div class="gt_privacy_field default_width mb20">
                                                <input class="c_ph" type="text" value="${r!}" onclick="changeAmountSubmit(this)" readonly>
                                            </div>
                                        </div>
                                        [/#list]
                                        [/#if]
                                    [/#if]
                                    <div class="col-md-6">
                                        <div class="gt_privacy_field default_width mb20">
                                            <input class="c_ph" type="text" id="rewardAmount" value="${content.chargeAmount!}" onkeyup="value=value.replace(/[^\d.]/g,'')" name="rewardAmount" placeholder="请输入捐赠金额"><label id="errorMsg_" class="error-message" >请输入捐赠金额</label>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="gt_privacy_field default_width mb20">
                                            <input class="c_ph" type="text" name="rewardName" id="rewardName" placeholder="请输入捐赠人姓名，不填默认匿名捐赠">
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="gt_privacy_field default_width">
                                            <input type="button" onclick="rewardPay()" id="reward-payBtn" value="捐  赠">
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div id="payMethod1" class="row">
                            <div class="col-md-6">
                                <div class="gt_d_upload_photo default_width">
                                    <div class="gt_d_upload_area default_width">
                                      <span id="wcode">
                                        <i class="fa fa-camera"></i>
                                      </span>
                                        <p class="gt_d_download_icon"><i class="fa fa-cny"></i></p>
                                    </div>
                                    <span>微信支付(手机用户长按识别二维码)</span>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="gt_d_upload_photo default_width">
                                    <div class="gt_d_upload_area default_width">
                                      <span id="acode">
                                        <i class="fa fa-camera"></i>
                                      </span>
                                        <p class="gt_d_download_icon"><i class="fa fa-cny"></i></p>
                                    </div>
                                    <span>支付宝支付</span>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
                <!--Classes List Wrap End-->
            </div>
        </section>
        <!--Classes Wrap End-->
    </div>
    <!--Main Content Wrap End-->

    <!--Footer Wrap Start-->
    [#include "../include/footer.html"/]
    <!--Footer Wrap End-->

    <!--Back to Top Wrap Start-->
    <div class="back-to-top">
        <a href="#home"><i class="fa fa-angle-up"></i></a>
    </div>
    <!--Back to Top Wrap Start-->

</div>
<!--gt Wrapper End-->

<!--Jquery Library-->
<!--Bootstrap core JavaScript-->
<script src="/${res}/js/bootstrap.min.js"></script>
<!--Chosen JavaScript-->
<script src="/${res}/js/chosen.jquery.min.js"></script>
<!--Custom JavaScript-->
<script src="/${res}/js/custom.js"></script>

</body>
</html>
